<template>
    <div class="plist">
        <mt-cell v-for="(item,index) in list" :title="item.specialname" is-link
	        :label="String(item.playcount)" :to="`/plist/info/${item.specialid}`" :key="index">
			<img slot="icon" :src="item.imgurl.replace('{size}', '400')" width="60" height="60">
		</mt-cell>
     
    </div>
</template>
<script>
import {getPlist} from "@/api"
import { Indicator } from 'mint-ui'

export default{
	data(){
		return {
			list:[]
		}
	},
	
created(){
 this.getlist()
}
,
methods:{
	getlist(){
			Indicator.open({
			text: '加载中...',
			spinnerType: 'snake'
				});
		getPlist().then(({data})=>{
			Indicator.close()
			// console.log(data)
			this.list = data.plist.list.info
		})
	}
}


	// created(){
	// 	this.getPList()
	// },
	// methods:{
	// 	getPList(){
	// 			Indicator.open({
	// 				text: '加载中...',
	// 				spinnerType: 'snake'
	// 			});
	// 			this.$http.get('/api/plist/index&json=true').then(({data}) => {
	// 				Indicator.close()
	// 				console.log(data)
	// 				this.list = data.plist.list.info
					
	// 			})
	// 		},
	// }

}
</script>